home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
E-G
/
educationstacks.sea
/
Circuits
/
card_3413.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
7KB
|
289 lines
-- card: 3413 from stack: in
-- bmap block id: 2123
-- flags: 4000
-- background id: 2693
-- name:
----- HyperTalk script -----
on closeField
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
end closeField
on calculate
get char 1 of card field "EMF"
if it="+" then
delete char 1 of card field "EMF"
end if
put card field "EMF" into E
get char 1 of card field "R1"
if it="+" then
delete char 1 of card field "R1"
end if
put card field "R1" into R1
put abs(R1) into card field "R1"
put abs(R1) into R1
if E=0 then
send zeroall
exit calculate
else
if R1=0 then
put "zap" into card field "A1"
put 0 into card field "V1"
exit calculate
end if
put E/R1 into I1
put E/1 into V1
end if
set numberFormat to "0.000"
put I1 into card field "A1"
put V1 into card field "V1"
end calculate
on zeroall
put 0 into card field "A1"
put 0 into card field "V1"
end zeroall
-- part 1 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=198 top=251 right=266 bottom=258
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: V1
-- part 2 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=89 top=155 right=170 bottom=145
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: A1
-- part 4 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=191 top=34 right=61 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: EMF
-- part 5 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=199 top=146 right=173 bottom=261
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: R1
-- part 6 (button)
-- low flags: 00
-- high flags: 4001
-- rect: left=327 top=128 right=148 bottom=339
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 closed
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=315 top=128 right=148 bottom=327
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 middle
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=304 top=128 right=148 bottom=316
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 open
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=339 top=128 right=147 bottom=400
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Switch
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=201 top=297 right=333 bottom=255
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 12 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=147 top=297 right=333 bottom=201
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part contents for background part 8
----- text -----
C1. Ohm's Law
-- part contents for card part 4
----- text -----
100
-- part contents for card part 5
----- text -----
25
-- part contents for card part 2
----- text -----
4.000
-- part contents for card part 1
----- text -----
100.000